//
//  CellOfUserDetail.m
//  PetAPP
//
//  Created by apple on 16/3/6.
//  Copyright © 2016年 Yuming. All rights reserved.
//

#import "CellOfUserDetail.h"
#import "ModelOfUserinfo.h"

@interface CellOfUserDetail ()

@property (nonatomic, retain) UILabel *labelOfName;

@property (nonatomic, retain) UILabel *labelOfContent;

@end

@implementation CellOfUserDetail

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {

    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubViews];
    }
    return self;
}

- (void)createSubViews {
    self.labelOfName = [[UILabel alloc] init];
    [self.contentView addSubview:_labelOfName];
    [_labelOfName release];
    self.labelOfName.textAlignment =  NSTextAlignmentRight;
    
    self.labelOfContent = [[UILabel alloc] init];
    [self.contentView addSubview:_labelOfContent];
    [_labelOfContent release];

}

- (void)handleDataWithName:(NSString *)name andContent:(NSString *)content{

    self.labelOfName.text = name;
    self.labelOfContent.text = content;

}

- (void)layoutSubviews {
    [super layoutSubviews];
    self.labelOfName.frame = CGRectMake(0, 10, 70, 30);
    
    self.labelOfContent.frame = CGRectMake(self.contentView.frame.size.width / 2 - 40, 10, self.contentView.frame.size.width / 2 + 30, 30);
    
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
